package com.sjn.util.encrytion;

/**
 *  简单的换位加密
 */
public class ShiftEncryption extends DataEncryption{

    public ShiftEncryption() {
    super();
    }

    @Override
    public String encryption() {
        //得到每个口令的单独字符
        byte[] by = getData().getBytes();
        //将字符往后推四位进行简单的加密
        for (int i=0;i<by.length;i++){
            by[i]+=4;
        }
        String nowse = new String(by);
        //将数据交付给父类
        super.setData(nowse);
            return nowse;
    }

}



